import http from "../utils/http";

// 获取新闻分类
export const postNewsCategory = () => {
  return http<any>({
    url: "NewsCategroy/index",
    method: "GET",
  });
};

// 获取新闻列表
export const postNewsIndex = (categroy_id: any) => {
  return http<any>({
    url: "news/index",
    method: "POST",
    data: {
      categroy_id,
    },
  });
};

// 获取新闻详情
export const postNewsView = (id: any) => {
  return http<any>({
    url: "news/view",
    method: "POST",
    data: {
      id,
    },
  });
};
